﻿export function setAnnotation(ele, text) {
    text ??= '';
    if (window.marked) {
        ele.innerHTML = window.marked.parse(text);
    } else {
        var html = '';
        var lines = text.replace('\r\n', '\n').split('\n');
        for (var line of lines) {
            html += `${line} </br>`;
        }
        ele.innerHTML = html;
    }
}